package com.tiger.communal.service.impl;

import java.math.BigDecimal;
import java.util.List;

import com.tiger.communal.domain.HydropowerAlter;
import com.tiger.communal.domain.HydropowerSubmeter;
import com.tiger.communal.mapper.HydropowerAlterMapper;
import com.tiger.communal.mapper.HydropowerSubmeterAlterMapper;
import com.tiger.communal.mapper.HydropowerSubmeterMapper;
import com.tiger.communal.service.IHydropowerAlterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 水电历史记录Service业务层处理
 *
 * @author standard
 * @date 2022-10-14
 */
@Service
public class HydropowerAlterServiceImpl implements IHydropowerAlterService {
    @Autowired
    private HydropowerAlterMapper hydropowerAlterMapper;
    @Autowired
    private HydropowerSubmeterMapper hydropowerSubmeterMapper;
    @Autowired
    private HydropowerSubmeterAlterMapper submeterAlterMapper;

    /**
     * 查询水电历史记录
     *
     * @param id 水电历史记录主键
     * @return 水电历史记录
     */
    @Override
    public HydropowerAlter selectHydropowerAlterById(Long id) {
        return hydropowerAlterMapper.selectHydropowerAlterById(id);
    }

    /**
     * 查询水电历史记录列表
     *
     * @param hydropowerAlter 水电历史记录
     * @return 水电历史记录
     */
    @Override
    public List<HydropowerAlter> selectHydropowerAlterList(HydropowerAlter hydropowerAlter) {
        return hydropowerAlterMapper.selectHydropowerAlterList(hydropowerAlter);
    }

    /**
     * 新增水电历史记录
     *
     * @param hydropowerAlter 水电历史记录
     * @return 结果
     */
    @Override
    public int insertHydropowerAlter(HydropowerAlter hydropowerAlter) {
        return hydropowerAlterMapper.insertHydropowerAlter(hydropowerAlter);
    }

    /**
     * 修改水电历史记录
     *
     * @param hydropowerAlter 水电历史记录
     * @return 结果
     */
    @Override
    public int updateHydropowerAlter(HydropowerAlter hydropowerAlter) {
        return hydropowerAlterMapper.updateHydropowerAlter(hydropowerAlter);
    }

    /**
     * 批量删除水电历史记录
     *
     * @param ids 需要删除的水电历史记录主键
     * @return 结果
     */
    @Override
    public int deleteHydropowerAlterByIds(Long[] ids) {
        return hydropowerAlterMapper.deleteHydropowerAlterByIds(ids);
    }

    /**
     * 删除水电历史记录信息
     *
     * @param id 水电历史记录主键
     * @return 结果
     */
    @Override
    public int deleteHydropowerAlterById(Long id) {
        return hydropowerAlterMapper.deleteHydropowerAlterById(id);
    }
}
